<?php

namespace maotool\stream;

class Stream
{

    private $value;

    public function __construct($value)
    {
        $this->value = $value;
    }

    public static function of($value)
    {
        return new Stream($value);
    }

    public function map()
    {
        return $this;
    }

    public function fore($fun)
    {
        foreach ($this->value as $item) {
            $fun($item);
        }
        return $this;
    }

}